package com.itheima.es.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.es.entity.PageResult;
import com.itheima.es.mapper.SkuMapper;
import com.itheima.es.pojo.Sku;
import com.itheima.es.service.SkuService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements SkuService {
    //分页查询
    @Override
    public List<Sku> findPage(int currentPage, int pageSize) {
        Page<Sku> page = page(new Page<>( currentPage,pageSize));
        List<Sku> rowsList = page.getRecords();
        return rowsList;
    }
}
